{extend name='public/window' /}

{block name="content"}
<style>
    .layui-input{
        width: 80%;
    }
    .layui-form-label{
        width: 100px;
    }
    .layui-layer{
        top: 90px;
    }
</style>
<div class="layui-fluid">
    <div class="layui-card">
        <div class="layui-card-body" style="padding: 15px;">
            {foreach ($info as $k=>$v)}
                <div class="layui-form-item">
                    <label class="layui-form-label">相关图片 *</label>
                    <div style="display:flex;align-items: center;padding-top: 10px;flex-wrap: wrap">
                        {foreach ($v['content'] as $kk=>$vv)}
                        <div style="margin-right: 10px">
                            <div style="text-align: center;width: 200px">{$vv['textname']}</div>
                            <img  src="{$vv['image']}" target="_blank" onclick="previewImg(this)" alt="" style="display: inline-block;width:300px;height: 200px">
                        </div>
                        {/foreach}
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">审核时间 </label>
                    <div class="layui-input-block">
                        <input type="text" lay-verify="required" disabled value="{$v.create_time}" autocomplete="off"
                               placeholder="" class="layui-input disabled">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">审核失败原因 </label>
                    <div class="layui-input-block">
                        <input type="text" lay-verify="required" disabled value="{$v.reason}" autocomplete="off"
                               placeholder="" class="layui-input disabled">
                    </div>
                </div>
                {/foreach}
        </div>
    </div>
</div>


<script>
    layui.use(['element', 'form', 'jquery', 'lucky', 'upload', 'laydate', 'xmSelect'], function () {
        var element = layui.element;
        var table = layui.table;
        var form = layui.form;
        var laydate = layui.laydate;
        var $ = layui.jquery;
        var lucky = layui.lucky;

        form.on('submit(report)', function (data) {
            lucky.FormSubmit("{:url('report')}", data.field, true);
            return false;
        });
        form.on('submit(noreport)', function (data) {
            lucky.FormSubmit("{:url('noreport')}", data.field, true);
            return false;
        });

    })
    function previewImg(url){
        console.log(url.src);
        var imgHtml = "<img src='" + url.src + "' width='100%' height='100%'/>";
        //弹出层
        layer.open({
            type: 1,
            shade: 0.8,
            offset: ['top:10px'],
            area: [600 + 'px', 700 + 'px'],
            shadeClose: true,
            scrollbar: false,
            title: "图片预览",
            content: imgHtml,
            cancel: function () {

            }
        });
    }
</script>

{/block}
